Integrand size = 21, antiderivative size = 52 \[ \int \csc (e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx=-\frac {(a+b)^2 \text {arctanh}(\cos (e+f x))}{f}+\frac {b (2 a+b) \sec (e+f x)}{f}+\frac {b^2 \sec ^3(e+f x)}{3 f} \]
[Out]
Time = 0.08 (sec) , antiderivative size = 52, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {4218, 472, 213} \[ \int \csc (e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx=-\frac {(a+b)^2 \text {arctanh}(\cos (e+f x))}{f}+\frac {b (2 a+b) \sec (e+f x)}{f}+\frac {b^2 \sec ^3(e+f x)}{3 f} \]
[In]
[Out]
Rule 213
Rule 472
Rule 4218
Rubi steps \begin{align*} \text {integral}& = -\frac {\text {Subst}\left (\int \frac {\left (b+a x^2\right )^2}{x^4 \left (1-x^2\right )} \, dx,x,\cos (e+f x)\right )}{f} \\ & = -\frac {\text {Subst}\left (\int \left (\frac {b^2}{x^4}+\frac {b (2 a+b)}{x^2}-\frac {(a+b)^2}{-1+x^2}\right ) \, dx,x,\cos (e+f x)\right )}{f} \\ & = \frac {b (2 a+b) \sec (e+f x)}{f}+\frac {b^2 \sec ^3(e+f x)}{3 f}+\frac {(a+b)^2 \text {Subst}\left (\int \frac {1}{-1+x^2} \, dx,x,\cos (e+f x)\right )}{f} \\ & = -\frac {(a+b)^2 \text {arctanh}(\cos (e+f x))}{f}+\frac {b (2 a+b) \sec (e+f x)}{f}+\frac {b^2 \sec ^3(e+f x)}{3 f} \\ \end{align*}
Leaf count is larger than twice the leaf count of optimal. \(108\) vs. \(2(52)=104\).
Time = 0.91 (sec) , antiderivative size = 108, normalized size of antiderivative = 2.08 \[ \int \csc (e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx=-\frac {4 \left (b+a \cos ^2(e+f x)\right )^2 \left (-b^2-3 b (2 a+b) \cos ^2(e+f x)+3 (a+b)^2 \cos ^3(e+f x) \left (\log \left (\cos \left (\frac {1}{2} (e+f x)\right )\right )-\log \left (\sin \left (\frac {1}{2} (e+f x)\right )\right )\right )\right ) \sec ^3(e+f x)}{3 f (a+2 b+a \cos (2 (e+f x)))^2} \]
[In]
[Out]
Time = 0.22 (sec) , antiderivative size = 94, normalized size of antiderivative = 1.81
method | result | size |
derivativedivides | \(\frac {a^{2} \ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )\right )+2 a b \left (\frac {1}{\cos \left (f x +e \right )}+\ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )\right )\right )+b^{2} \left (\frac {1}{3 \cos \left (f x +e \right )^{3}}+\frac {1}{\cos \left (f x +e \right )}+\ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )\right )\right )}{f}\) | \(94\) |
default | \(\frac {a^{2} \ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )\right )+2 a b \left (\frac {1}{\cos \left (f x +e \right )}+\ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )\right )\right )+b^{2} \left (\frac {1}{3 \cos \left (f x +e \right )^{3}}+\frac {1}{\cos \left (f x +e \right )}+\ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )\right )\right )}{f}\) | \(94\) |
norman | \(\frac {\frac {\left (8 a b +4 b^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}}{f}-\frac {12 a b +8 b^{2}}{3 f}-\frac {\left (4 a b +4 b^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{4}}{f}}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}-1\right )^{3}}+\frac {\left (a^{2}+2 a b +b^{2}\right ) \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f}\) | \(110\) |
parallelrisch | \(\frac {3 \left (\frac {\cos \left (3 f x +3 e \right )}{3}+\cos \left (f x +e \right )\right ) \left (a +b \right )^{2} \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )+6 b \left (\frac {\left (a +\frac {2 b}{3}\right ) \cos \left (3 f x +3 e \right )}{3}+\frac {\left (2 a +b \right ) \cos \left (2 f x +2 e \right )}{3}+\left (a +\frac {2 b}{3}\right ) \cos \left (f x +e \right )+\frac {2 a}{3}+\frac {5 b}{9}\right )}{f \left (\cos \left (3 f x +3 e \right )+3 \cos \left (f x +e \right )\right )}\) | \(115\) |
risch | \(\frac {2 b \,{\mathrm e}^{i \left (f x +e \right )} \left (6 a \,{\mathrm e}^{4 i \left (f x +e \right )}+3 b \,{\mathrm e}^{4 i \left (f x +e \right )}+12 a \,{\mathrm e}^{2 i \left (f x +e \right )}+10 b \,{\mathrm e}^{2 i \left (f x +e \right )}+6 a +3 b \right )}{3 f \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{3}}+\frac {\ln \left ({\mathrm e}^{i \left (f x +e \right )}-1\right ) a^{2}}{f}+\frac {2 \ln \left ({\mathrm e}^{i \left (f x +e \right )}-1\right ) a b}{f}+\frac {\ln \left ({\mathrm e}^{i \left (f x +e \right )}-1\right ) b^{2}}{f}-\frac {\ln \left ({\mathrm e}^{i \left (f x +e \right )}+1\right ) a^{2}}{f}-\frac {2 \ln \left ({\mathrm e}^{i \left (f x +e \right )}+1\right ) a b}{f}-\frac {\ln \left ({\mathrm e}^{i \left (f x +e \right )}+1\right ) b^{2}}{f}\) | \(211\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 101 vs. \(2 (50) = 100\).
Time = 0.26 (sec) , antiderivative size = 101, normalized size of antiderivative = 1.94 \[ \int \csc (e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx=-\frac {3 \, {\left (a^{2} + 2 \, a b + b^{2}\right )} \cos \left (f x + e\right )^{3} \log \left (\frac {1}{2} \, \cos \left (f x + e\right ) + \frac {1}{2}\right ) - 3 \, {\left (a^{2} + 2 \, a b + b^{2}\right )} \cos \left (f x + e\right )^{3} \log \left (-\frac {1}{2} \, \cos \left (f x + e\right ) + \frac {1}{2}\right ) - 6 \, {\left (2 \, a b + b^{2}\right )} \cos \left (f x + e\right )^{2} - 2 \, b^{2}}{6 \, f \cos \left (f x + e\right )^{3}} \]
[In]
[Out]
\[ \int \csc (e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx=\int \left (a + b \sec ^{2}{\left (e + f x \right )}\right )^{2} \csc {\left (e + f x \right )}\, dx \]
[In]
[Out]
none
Time = 0.18 (sec) , antiderivative size = 82, normalized size of antiderivative = 1.58 \[ \int \csc (e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx=-\frac {3 \, {\left (a^{2} + 2 \, a b + b^{2}\right )} \log \left (\cos \left (f x + e\right ) + 1\right ) - 3 \, {\left (a^{2} + 2 \, a b + b^{2}\right )} \log \left (\cos \left (f x + e\right ) - 1\right ) - \frac {2 \, {\left (3 \, {\left (2 \, a b + b^{2}\right )} \cos \left (f x + e\right )^{2} + b^{2}\right )}}{\cos \left (f x + e\right )^{3}}}{6 \, f} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 172 vs. \(2 (50) = 100\).
Time = 0.32 (sec) , antiderivative size = 172, normalized size of antiderivative = 3.31 \[ \int \csc (e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx=\frac {3 \, {\left (a^{2} + 2 \, a b + b^{2}\right )} \log \left (\frac {{\left | -\cos \left (f x + e\right ) + 1 \right |}}{{\left | \cos \left (f x + e\right ) + 1 \right |}}\right ) + \frac {8 \, {\left (3 \, a b + 2 \, b^{2} + \frac {6 \, a b {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} + \frac {3 \, b^{2} {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} + \frac {3 \, a b {\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac {3 \, b^{2} {\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}}\right )}}{{\left (\frac {\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1} + 1\right )}^{3}}}{6 \, f} \]
[In]
[Out]
Time = 0.16 (sec) , antiderivative size = 53, normalized size of antiderivative = 1.02 \[ \int \csc (e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx=\frac {{\cos \left (e+f\,x\right )}^2\,\left (b^2+2\,a\,b\right )+\frac {b^2}{3}}{f\,{\cos \left (e+f\,x\right )}^3}-\frac {\mathrm {atanh}\left (\cos \left (e+f\,x\right )\right )\,{\left (a+b\right )}^2}{f} \]
[In]
[Out]